from django import forms
from common.utils.custom_form_field import JsonArrayDateField, JsonArrayField


class ActiveAnalysisForm(forms.Form):
    time_range = JsonArrayDateField()
    user_id = forms.IntegerField(required=False)
    registered_time_range = JsonArrayDateField(required=False)
    sort_by = forms.CharField(max_length=50, required=False)
    channel = JsonArrayField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    recharge_amount_max = forms.IntegerField(required=False)
    recharge_amount_min = forms.IntegerField(required=False)
    display_dimension = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)


class PayAbilityAnalysisForm(forms.Form):
    time_range = JsonArrayDateField()
    time_interval_type = forms.CharField(required=False)
    recharge_stage_list = JsonArrayField(required=False)
    chn_filter_list = JsonArrayField(required=False)
    user_type = forms.CharField(required=False)
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)


class NewUserAnalysis(forms.Form):
    time_range = JsonArrayDateField()
    chn_filter_list = JsonArrayField(required=False)
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)


class NewUserStayAnalysis(forms.Form):
    time_range = JsonArrayDateField()
    chn_filter_list = JsonArrayField(required=False)
    stay_type = forms.CharField(required=False)
    user_type = forms.CharField(required=False)
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)
    display_type = forms.CharField(required=False)


class ContinuousRechargeAnalysis(forms.Form):
    time_range = JsonArrayDateField()
    chn_filter_list = JsonArrayField(required=False)
    recharge_stats_type = forms.CharField(required=False)
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)


class GameStageAnalysis(forms.Form):
    time_range = JsonArrayDateField()
    game_stage_list = JsonArrayField(required=False)
    game_type = JsonArrayField(required=False)
    user_type = forms.CharField(required=False)
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)
